import request from '@/utils/request'

// 查询批发商品列表
export function listWholesale(query) {
  return request({
    url: '/product/wholesale/list',
    method: 'get',
    params: query
  })
}

// 查询批发商品详细
export function getWholesale(id) {
  return request({
    url: '/product/wholesale/' + id,
    method: 'get'
  })
}

// 新增批发商品
export function addWholesale(data) {
  return request({
    url: '/product/wholesale',
    method: 'post',
    data: data
  })
}

// 修改批发商品
export function updateWholesale(data) {
  return request({
    url: '/product/wholesale',
    method: 'put',
    data: data
  })
}

// 删除批发商品
export function delWholesale(id) {
  return request({
    url: '/product/wholesale/' + id,
    method: 'delete'
  })
}
